package com.beantest;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.AfterReturning;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class AuditAspect {

    @AfterReturning(pointcut = "execution(* com.beantest.UserService.*(..))", returning = "result")
    public void auditAfterReturning(Object result) {
        System.out.println("AuditAspect: 方法执行后审计，返回值: " + result);
    }
}